﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MachineVision.Domain.Migrations
{
    public partial class addHistorydatas : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {

            migrationBuilder.AddColumn<double>(
                name: "Humidity",
                table: "MissionHistoryInfos",
                type: "double",
                nullable: false,
                defaultValue: 0.0);

            migrationBuilder.AddColumn<double>(
                name: "Temperature",
                table: "MissionHistoryInfos",
                type: "double",
                nullable: false,
                defaultValue: 0.0);

            migrationBuilder.AddColumn<string>(
                name: "WorkNum",
                table: "MissionHistoryInfos",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "WorkPlace",
                table: "MissionHistoryInfos",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "WarningInfos",
                keyColumn: "Id",
                keyValue: 1,
                column: "Type",
                value: 5);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {

            migrationBuilder.DropColumn(
                name: "Humidity",
                table: "MissionHistoryInfos");

            migrationBuilder.DropColumn(
                name: "Temperature",
                table: "MissionHistoryInfos");

            migrationBuilder.DropColumn(
                name: "WorkNum",
                table: "MissionHistoryInfos");

            migrationBuilder.DropColumn(
                name: "WorkPlace",
                table: "MissionHistoryInfos");

            migrationBuilder.UpdateData(
                table: "WarningInfos",
                keyColumn: "Id",
                keyValue: 1,
                column: "Type",
                value: 3);
        }
    }
}
